A custom resource provider allows any file imported into Trilium (images, fonts, stylesheets) to be publicly accessible via a URL.
A potential use case for this is to add embed a custom font alongside a theme.
#customResourceProvider=hello.<protocol>://<host>/custom/hello (where <protocol> is
either http or https based on your setup, and <host> is
the host or IP to your Trilium server instance). If you are running the
TriliumNext application without a server, use http://localhost:37840 as
the base URL.Instead of hello, the name can be:
fonts/Roboto.ttf, which would be accessible
via <host>/custom/fonts/Roboto.ttf.hello/.* which will be accessible via /custom/hello/1, /custom/hello/2, /custom/hello/world,
etc.For example, if you have a custom font to be imported by the theme, first
upload a font file into Trilium and assign it the #customResourceProvider=fonts/myfont.ttf attribute.
Then modify the theme CSS to point to:
@font-face {
font-family: customFont;
src: url("/custom/fonts/myfont.ttf");
}
div {
font-family: customFont;
}